package com.geostar.constructionland.statistics.service.handler;

import com.geostar.constructionland.statistics.enumeration.RequestType;

import java.util.Objects;

/**
 * @Author makoto_zhu
 * @Date 2020-10-29 11:48:09
 * @Description 需求类型，需要处理的数据
 **/
public class Request {
    private final RequestType requestType;

    private boolean handled;

    private Object data;

    public Request(final RequestType requestType, Object data) {
        this.requestType = Objects.requireNonNull(requestType);
        this.data = Objects.requireNonNull(data);
    }

    public RequestType getRequestType() {
        return requestType;
    }

    public Object getData() {
        return data;
    }

    public void markHandled() {
        this.handled = true;
    }

    public boolean isHandled() {
        return this.handled;
    }


}